Clear "/control/shutdown" node on domain restore.
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Wed, 17 Aug 2005 10:18:13 +0000 (10:18 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Wed, 17 Aug 2005 10:18:13 +0000 (10:18 +0000)
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
tools/python/xen/xend/XendDomainInfo.py

index 7e0c07ab5399adeb7afe8c2214cdc12fd2735afa..570bb6dbdacb50a3227aab49c6a054ade6a4a153 100644 (file)
@@ -208,6 +208,7 @@ class XendDomainInfo:
         log.debug('restoring with ssidref='+str(ssidref))
         id = xc.domain_create(ssidref = ssidref)
         vm.setdom(id)
+        vm.clear_shutdown()
         try:
             vm.restore = True
             vm.construct(config)
@@ -979,6 +980,11 @@ class XendDomainInfo:
         if not reason in ['suspend']:
             self.shutdown_pending = {'start':time.time(), 'reason':reason}
 
+    def clear_shutdown(self):
+        db = self.db.addChild("/control")
+        db['shutdown'] = ""
+        db.saveDB(save=True)
+
     def send_sysrq(self, key=0):
         db = self.db.addChild("/control");
         db['sysrq'] = '%c' % key;